MarkdownViewBase<T>
Assembly: ServiceStack.Razor.dll
View Source
public abstract class MarkdownViewBase<T> : MarkdownViewBase, ITemplatePage
Properties
Html
View Source
public HtmlHelper<T> Html { get; }
Inherited Properties
AppHost
The AppHost so you can access configuration and resolve dependencies, etc.
View Source
public IAppHost AppHost { get; set; }
Html
ASP.NET MVC's HtmlHelper
View Source
public HtmlHelper Html { get; protected set; }
MarkdownPage
This precompiled Markdown page with Metadata
View Source
public MarkdownPage MarkdownPage { get; protected set; }
Model
The Response DTO
View Source
public object Model { get; protected set; }
RenderHtml
Whether HTML or Markdown output is requested
View Source
public bool RenderHtml { get; protected set; }
ScopeArgs
All variables passed to and created by your page. The Response DTO is stored and accessible via the 'Model' variable.
All variables and outputs created are stored in ScopeArgs which is what's available to your website template. The Generated page is stored in the 'Body' variable.
View Source
public Dictionary<string, object> ScopeArgs { get; set; }
ViewEngine
Reference to MarkdownViewEngine
View Source
public IViewEngine ViewEngine { get; set; }
Methods
GetHtmlHelper()
View Source
protected override HtmlHelper GetHtmlHelper()
Returns
Init(IAppHost, MarkdownPage, Dictionary<String, Object>, Object, Boolean)
View Source
public override void Init(IAppHost appHost, MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, object model, bool renderHtml)
Parameters
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
ServiceStack.Support.Markdown.MarkdownPage | markdownPage |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
System.Object | model |
System.Boolean | renderHtml |
Inherited Methods
Combine(String, String[])
View Source
public string Combine(string separator, params string[] parts)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | separator |
System.String[] | parts |
Get<T>()
Resolve registered Assemblies
View Source
public T Get<T>()
Returns
<T>
Type Parameters
T
GetHtmlHelper()
Ensure the same instance is used for subclasses
View Source
protected virtual HtmlHelper GetHtmlHelper()
Returns
Init(IAppHost, MarkdownPage, Dictionary<String, Object>, Object, Boolean)
View Source
public virtual void Init(IAppHost appHost, MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, object model, bool renderHtml)
Parameters
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
ServiceStack.Support.Markdown.MarkdownPage | markdownPage |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
System.Object | model |
System.Boolean | renderHtml |
InitHelpers()
Called before page is executed
View Source
public virtual void InitHelpers()
Lower(String)
View Source
public string Lower(string name)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | name |
OnLoad()
Called after page is executed but before it's merged with the website template if any.
View Source
public virtual void OnLoad()
Partial(String, Object)
Return the output of a different view with the specified name using the supplied model
View Source
public MvcHtmlString Partial(string viewName, object model)
Returns
ServiceStack.Html.MvcHtmlString
Parameters
Type | Name |
---|---|
System.String | viewName |
System.Object | model |
Raw(String)
Don't HTML encode safe output
View Source
public MvcHtmlString Raw(string content)
Returns
ServiceStack.Html.MvcHtmlString
Parameters
Type | Name |
---|---|
System.String | content |
Upper(String)
View Source
public string Upper(string name)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | name |